{extend name="base" /}

{block name="title"}推广注册{/block}

{block name="resource"}
<style type="text/css">
	input {
		-webkit-user-select: auto;
		-webkit-touch-callout: default;
		/*-webkit-overflow-scrolling: auto;*/
	}
</style>
{/block}

{block name="main"}
<div class="main">
	<div class="container">
		<div class="login" style="width: 100%; margin: 0;overflow: auto;">
			<div class="zhmm">
				<div class="ale_body" style="max-height: none;">
					<form action="/register" method="post" id="promotionRegisterForm">
						<div class="inp_gruop">
							<span>推广人账号</span>
							<input type="text" name="promotion_username" placeholder="输入账号" value="{$Think.get.promotion_username}" readonly/>
						</div>
						<div class="inp_gruop">
							<span>账号</span>
							<input type="text" name="username" placeholder="输入账号"/>
						</div>
						<div class="inp_gruop">
							<span>真实姓名</span>
							<input type="text" name="realname" placeholder="输入真实姓名"/>
						</div>
						<span>云付通账号，请认证填写，不能修改。</span>
						<div class="inp_gruop">
							<span>云付通账号</span>
							<input type="text" name="bank_code" placeholder="输入云付通账号"/>
						</div>
						<div class="inp_gruop">
							<span>手机号</span>
							<input type="text" name="phone" placeholder="输入验证码"/>
							<!--<p class="yzm_box">
								<a href="javascript:;">获取验证码</a>
							</p>-->
						</div>
						<!--<div class="inp_gruop">
							<span>验证码</span>
							<input type="text" name="" id="" value="" placeholder="输入账号"/>
						</div>-->
						<div class="inp_gruop">
							<span>密码</span>
							<input type="password" name="password" placeholder="输入密码"/>
						</div>
						<div class="inp_gruop">
							<span>确认密码</span>
							<input type="password" name="comfirm_password" placeholder="输入密码"/>
						</div>
						<div class="inp_gruop">
							<span>安全密码</span>
							<input type="password" name="pay_password" placeholder="输入安全密码"/>
						</div>
						<div class="inp_gruop">
							<span>确认安全密码</span>
							<input type="password" name="comfirm_pay_password" placeholder="输入安全密码"/>
						</div>
						<div class="inp_gruop">
							<span>验证码</span>
							<input type="text" name="captcha" placeholder="输入验证码"/>
							<p class="yzm_box">
								<img src="{:captcha_src()}" style="cursor: pointer;" onclick="this.src='{:captcha_src()}?v='+(new Date()).getTime();" alt="验证码" ></img>
							</p>
						</div>
						<div class="btn_box">
							<button class="btn_zdy">注　册</button>
						</div>
					</form>
				</div>
			</div>
		</div>
	</div>
</div>
{/block}

{block name="script"}
<script type="text/javascript">
	var promotionRegisterForm = $('#promotionRegisterForm');

	promotionRegisterForm.submit(function() {
		$.post('/register', $(this).serialize(), function(result) {
			if(result.code == 0) {
				alert(result.message);
				window.location.href = "/";
			} else {
				alert(result.message);
			}
		}, 'json');
		return false;
	});
</script>
{/block}